package com.carp.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("carp_user")
public class CarpUser implements Serializable {
    @TableId(type = IdType.AUTO)
    private Integer id;
    private String phone;
    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY) //不会把此字段数据返回给前端
    private String password;
    private String nickname;

    @TableField(fill = FieldFill.INSERT)
    private Date createTime;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date modifyTime;

    private String avatarUrl;
    private String address;

   //token
    @TableField(exist = false)
    private String token;
}
